<?php
ob_start();
//
include("include/config.php");
include("include/functions.php");

if(isset($_SESSION['MEMBER_ID']))
{
	$billid=$_REQUEST['billid'];
	$id=$_SESSION['MEMBER_ID'];
	$name=$_POST['username'];
    $add=$_POST['address'];
    $cuntry=$_POST['country'];
    $zip=$_POST['zip'];
    $ph=$_POST['phone'];
    $email=$_POST['email'];
	$city=$_POST['city'];
	$state=$_POST['state'];
$data=mysql_query("insert into shipinfo values('','$id',$billid,'$name','$ph','$email','$cuntry','$state','$city','$add','$zip','no')");

if($data)
{
$_SESSION['billid']=$billid;
//echo $billid;
		$x=mysql_query("select shipid,email from shipinfo where billid=$billid");
while($s=mysql_fetch_row($x))
{
	
	$_SESSION['shipid']=$s[0];
	$_SESSION['email']=$s[1];
	//echo $s[1];
}

header("location:billing1.php");

}
else
{echo mysql_error();
}

}
	?>
